﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace EHR.Elements
{
    public partial class NavBar : UserControl
    {
        public NavBar()
        {
            InitializeComponent();
        }

        private void AddPos(string pos)
        {
            StackPanel s = new StackPanel() { Orientation = Orientation.Horizontal };
            TextBlock arrow = new TextBlock() { Text = " > ", Foreground = new SolidColorBrush(Colors.White) };
            TextBlock txt = new TextBlock() { Text = pos, Foreground = new SolidColorBrush(Color.FromArgb(255, 110, 187, 222)) };
            s.Children.Add(arrow);
            s.Children.Add(txt);
            pnl.Children.Add(s);
        }

        public void SetPos(params string[] pos)
        {
            pnl.Children.Clear();
            foreach (string p in pos)
            {
                AddPos(p);
            }
        }

        public void SetPos(IList<string> pos)
        {
            pnl.Children.Clear();
            foreach (string p in pos)
            {
                AddPos(p);
            }
        }
    }
}
